package cn.njupt;

import java.util.Comparator;

public abstract  class AbstractHeap<E> implements Heap<E>{
    protected int size;
    protected Comparator<E> comparator;

    public AbstractHeap(Comparator comparator){
        this.comparator=comparator;
    }
    @Override
    public int size() {
        return size;
    }

    @Override
    public boolean isEmpty() {
        return size==0;
    }
}
